Domain-Specific Languages with Scala
نویسندگان
چکیده
Domain-Specific Languages (DSLs) are often classified into external and internal DSLs. An external DSL is a stand-alone language with its own parser. An internal DSL is an extension of an existing programming language, the host language, offering the user of the DSL domain-specific constructs as well as the constructs of the host language, thus providing a richer language than the DSL itself. In this paper we report on experiences implementing external as well as internal formal modeling DSLs with the Scala programming language, known in particular for its support for defining DSLs. The modeling languages include monitoring logics, a testing language, and a general purpose SysML inspired modeling language. We present a systematic overview of advantages and disadvantages of each option.
منابع مشابه
Experiences with Domain-Specific Language Embedding in Scala
Embedding domain-specific languages (DSLs) in generalpurpose programming languages offers a simpler path to implementation than developing standalone DSL processors. However, sacrifices must be made, particularly in formal analysis of DSL programs. This paper explores these tradeoffs in the context of the Kiama project that is investigating embedding of language processing DSLs in the Scala lan...
متن کاملUsing Domain Specific Languages for Modeling and Simulation: ScalaTion as a Case Study
Progress in programming paradigms and languages has over time influenced the way that simulation programs are written. Modern object-oriented, functional programming languages are expressive enough to define embedded Domain Specific Languages (DSLs). The Scala programming language is used to implement ScalaTion that supports several popular simulation modeling paradigms. As a case study, ScalaT...
متن کاملImplementing a Bidirectional Model Transformation Language as an Internal DSL in Scala
Despite advantages in terms of comprehensibility, verification, and maintainability, bidirectional transformation (bx) languages lack wide-spread adoption. Possible reasons are that tool support for bx languages is sometimes weak or outdated, that many bx languages are hard to integrate with existing software technologies, or that bx languages often cannot be mixed with unidirectional transform...
متن کاملTool Demo: Scala-Virtualized
This paper describes Scala-Virtualized, which extends the Scala language and compiler with a small number of features that enable combining the benefits of shallow and deep embeddings of DSLs. We demonstrate our approach by showing how to embed three different domain-specific languages in Scala. Moreover, we summarize how others have been using our extended compiler in their own research and te...
متن کاملScala Macros, a Technical Report
Metaprogramming is a powerful technique of software development, which allows to automate program generation. Applications of metaprogramming range from improving expressiveness of a programming language via deep embedding of domain-specific languages to boosting performance of produced code by providing programmer with finegrained control over compilation. In this report we introduce macros, f...
متن کاملScala Macros, a Technical Report (meta 2012)
Metaprogramming is a powerful technique of software development, which allows to automate program generation. Applications of metaprogramming range from improving expressiveness of a programming language via deep embedding of domain-specific languages to boosting performance of produced code by providing programmer with finegrained control over compilation. In this report we introduce macros, f...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2015